# -*- encoding: utf-8 -*-
'''
@File    :   1.13_4.py
@Time    :   2022/10/25 20:28:33
@Author  :   Cms 
@Version :   1.0
@Contact :   2267000140@qq.com
@WebSite    :   www.baidu.com
'''

# here put the import lib

list1 = [x for x in range(1,21)]
print(list1)

#列表解释式
list2 = [x for x in list1 if x%2==1]
print(list2)

#lambda
isodd = lambda x:x%2==1
templist = filter(isodd,list1)
print(list(templist))